const screenResume1 = (name: string, age: number, bust: number) => {
  age < 24 && bust >= 90 && console.log(name + "进入面试");
  (age >= 24 || bust < 90) && console.log(name + "被淘汰");
};
const getResume1 = (name: string, age: number, bust: number) => {
  console.log(name + "年龄是" + age);
  console.log(name + "胸围是" + bust);
};

screenResume1("大脚", 28, 93);
getResume1("大脚", 28, 93);

//使用接口定义传参类型
//接口不仅可以限制对象,还可以限制类
interface Girl {
  name: string;
  age: number;
  bust: number;
  waistline?: number;
  [propName: string]: any; //表示名称是string类型,值是任何类型
  say(): void;
}
interface Teacher extends Girl {
  teach(): string;
}
const girl = {
  name: "大脚",
  age: 28,
  bust: 93,
  waistline: 30,
  sex: "女",
  say() {
    console.log("欢迎光临红浪漫洗浴中心");
  },
  teach() {
    return "我来教你";
  },
};
class xiaoJieJie8 implements Girl {
  name = "刘英";
  age = 28;
  bust = 93;
  say(): void {
    console.log("欢迎光临红浪漫洗浴中心");
  }
}
const screenResume2 = (girl: Girl) => {
  girl.age < 24 && girl.bust >= 90 && console.log(girl.name + "进入面试");
  (girl.age >= 24 || girl.bust < 90) && console.log(girl.name + "被淘汰");
};
const getResume2 = (girl: Teacher) => {
  console.log(girl.name + "年龄是" + girl.age);
  console.log(girl.name + "胸围是" + girl.bust);
  girl.waistline && console.log(girl.name + "腰围是" + girl.waistline);
  girl.sex && console.log(girl.sex + "性别是" + girl.sex);
  girl.say();
};

screenResume2(girl);
getResume2(girl);
